Connecting a Capture Window to a Capture Driver

You can dynamically connect or disconnect a capture window to a capture driver. You can connect or associate a capture window with a capture driver by using the WM_CAP_DRIVER_CONNECT18DX57M message (or the capDriverConnectB8VQ13 macro). After a capture window and capture driver are connected, you can send device-specific messages to the capture driver associated with a capture window.

If you have more than one capture device installed on a system, you can connect a capture window to a particular video capture device driver by specifying an integer for the wParam parameter of the WM_CAP_DRIVER_CONNECT message. The integer is an index that identifies a video capture driver listed in the registry or in the [drivers] section of the SYSTEM.INI file. Use zero for the first index entry.

You can retrieve the name and version of an installed capture driver by using the the capGetDriverDescriptionEAG5_H function. Your application can use this function to enumerate the installed capture devices and drivers, so the user can select a capture device to connect to a capture window.

You can retrieve the name of the capture device driver connected to a capture window by using the WM_CAP_DRIVER_GET_NAME2_BJBDQ message (or the capDriverGetName529OZE macro). To retrieve the version of an installed capture driver, use the WM_CAP_DRIVER_GET_VERSIONEM07VD message (or the capDriverGetVersionD4EL93 macro).

You can disconnect a capture window from a capture driver by using the WM_CAP_DRIVER_DISCONNECT1ZLXAZ message (or the capDriverDisconnectX8EFDN macro).

When an capture window is destroyed, any connected video capture device drivers are automatically disconnected.